package Extendedexercise;

public class TestDay05 {
    public static void main(String[] args) {
        /*
        int sum =0;
        for (int i = 1; i <=100 ; i++) {
            if (i%2==0) {
                sum+=i;
            }
        }
        System.out.println("1到100内所有偶数和为:"+sum);
        int sum1 = 1;
        for (int i = 1; i <=8 ; i++) {
            sum1 *=i;
        }
        System.out.println(sum1);

        for (int i = 1; i < 6; i++) {
            for (int j = 1; j <=i ; j++) {
                System.out.print("*");
            }
            System.out.println();
        }

         */

        int[]arr = new int[10];
        for (int i=0;i < arr.length;i++){
            arr[i]=(int) (Math.random()*100);
            System.out.println(arr[i]);
        }
        int max = arr[0];
        for (int i = 1; i < arr.length ; i++) {
            if (arr[i]>max) {
                max = arr[i];
            }

        }
        System.out.println(max);

    }
}

